package com.gs.dao;

import java.sql.Timestamp;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gs.pojo.StayRegister;

public interface StayRegisterDao {

	int deleteById(Integer id);

	//新增
	int insertAll(StayRegister stayResgister);

	//查询所有住宿信息
	List<StayRegister> selectAll();

	//统计数据 用于图标显示
	List<StayRegister> selectShuJuTongJi(@Param("min")Timestamp min, 
			@Param("max")Timestamp max);

	//修改总费用
	int updateRemind(@Param("id")int id,@Param("remind")int remind);


	//修改 预定id
	int updateStayRegisterPredetermineID(@Param("predetermineID")Integer predetermineID,
			@Param("id")Integer id);

	//新增押金明细
	int insertDeposit(StayRegister stayRegister);



	//旅客的分页查询
	List<StayRegister> pageFuzzyselectOne(@Param("receiveTargeTypeID")int receiveTargeTypeID,
			@Param("isBillID")int isBillID, @Param("roomNumber")String roomNumber ,	
			@Param("start")int start,@Param("pageSize")int pageSize);

	//模糊查询旅客总数
	int countFuzzyselectOne(@Param("receiveTargeTypeID")int receiveTargeTypeID,
			@Param("isBillID")int isBillID, @Param("roomNumber")String roomNumber );
	//根据 团队id来查询 总费用
	List<StayRegister> selectFormTeamId(@Param("receiveTargetID")int receiveTargetID,
			@Param("isBillID")int isBillID);

	//根据结账状态ID查询团队小伙伴是否结账
	List<StayRegister> selectFormTeamIdTwo(int isBillID);

	//团队的分页模糊查询 two 
	List<StayRegister> pageFuzzyselectTwo(@Param("receiveTargetID")int receiveTargetID,
			@Param("isBillID")int isBillID,	@Param("roomNumber")String roomNumber,
			@Param("start")int start,@Param("pageSize")int pageSize);

	//团队的分页模糊查询总条数two
	int countFuzzyselectTwo(@Param("receiveTargetID")int receiveTargetID,
			@Param("isBillID")int isBillID,@Param("roomNumber")String roomNumber);

	//团队的分页模糊查询 Three
	List<StayRegister> pageFuzzyselectThree(@Param("isBillID")int isBillID,	
			@Param("roomNumber")String roomNumber,
			@Param("start")int start,@Param("pageSize")int pageSize);

	//团队的分页模糊查询总条数Three
	int countFuzzyselectThree(@Param("isBillID")int isBillID,
			@Param("roomNumber")String roomNumber);

	//新增住宿明细
	int insertStayregisterdetails(@Param("stayRegisterID")int stayRegisterID, 
			@Param("passengerID")int passengerID);

	//查询用于计算房间加商品消费
	List<StayRegister> selectMoney(int id);

	//换房 修改原信息
	int updateChangRoom(StayRegister stayRegister);

	//换房 查看原信息
	List<StayRegister> selectChangRoom(int id);
	//查看押金信息
	List<StayRegister> selectDepositById(Integer id);

	//消费明细分页
	List<StayRegister> pageConsumption(@Param("consumptionStayRegisterID")int consumptionStayRegisterID,
			@Param("start")int start,@Param("pageSize")int pageSize);

	//消费明细分页总条数
	int countConsumption(int consumptionStayRegisterID);

	//消费明细的删除
	int deleteConsumption(Integer id);
	
	//新增消费记录
	int insertConsumptiondetails(StayRegister stayRegister);
	
	
}
